package com.weiqiao.api.until.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author 123
 * @date 2019-10-17 18:03
 */
@Component
public class WXConfig implements InitializingBean {
    @Value("${wx.appid}")
    private String appid;
    @Value("${wx.APPscrect}")
    private String APPscrect;
    @Value("${wx.url.getticket}")
    private String ticket;
    @Value("${wx.url.accesstoken}")
    private String accesstoken;
    @Value("${wx.url.userinfo}")
    private String userinfo;
    @Value("${wx.url.clientcredential}")
    private String clientcredential;
    @Value("${wx.url.refreshtoken}")
    private String refreshtoken;
    @Value("${company.default}")
    private Integer companyid;
    @Value("${wx.url.jump_h5_url}")
    private String jump_h5_url;
    @Value("${wq.uploadFile}")
    private String uploadFile;
    @Value("${wq.upload}")
    private String upload;



    public static String APPID;
    public static String APPSCRECT;
    public static String TICKET;
    public static String ACCESSTOKEN;
    public static String USERINFO;
    public static String CLIENTCREDENTIAL;
    public static String REFRESHTOKEN;
    public static Integer COMPANYID;
    public static String JUMP_H5_URL;
    public static String UPLOADFILE;
    public static String UPLOAD;

    @Override
    public void afterPropertiesSet() {
        APPID = appid;
        APPSCRECT = APPscrect;
        TICKET = ticket;
        ACCESSTOKEN = accesstoken;
        USERINFO = userinfo;
        CLIENTCREDENTIAL = clientcredential;
        REFRESHTOKEN = refreshtoken;
        COMPANYID = companyid;
        JUMP_H5_URL = jump_h5_url;
        UPLOADFILE = uploadFile;
        UPLOAD = upload;
    }
}
